import React, { FC, useCallback, useState } from 'react'
import Header from '@/components/header'
import { HashRouter } from 'react-router-dom'
import Router from '@/router'
import styled from "styled-components"
import background from '@/assert/images/background.png'
import light from '@/assert/images/light.png'
import { useStores } from '@/store/index';
import './App.css'
import { Provider } from 'mobx-react'
import { HeaderType } from './store/header'
import "react-datepicker/dist/react-datepicker.css";
const AppStyle = styled.div`
  width: 100%;
  height: 100%;
  background-image: url(${background});
  .light{
    background-image: url(${light});
  }
`
const App: FC<{}> = function () {
  const store = useStores();

  return (
    <Provider {...store}>
      <HashRouter>
        <AppStyle>
          <Header />
          <div>
            <Router />
          </div>
        </AppStyle>
      </HashRouter>
    </Provider>
  )
}

export default App
